Time zone name fixes for non-ASCII locales (Bug#641, Bug#9794)
authorPaul Eggert <eggert@cs.ucla.edu>
Thu, 20 Oct 2011 06:52:55 +0000 (23:52 -0700)
committerPaul Eggert <eggert@cs.ucla.edu>
Thu, 20 Oct 2011 06:52:55 +0000 (23:52 -0700)
commit4223a341d87be0615b54015514daca2c3c9f6167
tree545e450e05996033496c6a63b9bd73f31aa64585
parent9a169cea45c0abfabba51b9fcebbb69135a6d24f
Time zone name fixes for non-ASCII locales (Bug#641, Bug#9794)

* configure.in (AC_STRUCT_TM, AC_STRUCT_TIMEZONE, HAVE_TM_GMTOFF):
Remove; no longer needed, now that we defer to strftime for time
zone names.
* src/editfns.c: Rewrite current-time-zone so that it invokes
the equivalent of (format-time-string "%Z") to get the time zone name.
This fixes a bug when the time zone name contains characters that
need converting from the system time locale to Emacs internal format.
This fixes a shortcoming that I introduced in my 1999-10-19 patch:
that patch fixed format-time-string to do the conversion, but
I forgot to fix current-time-zone.
(format_time_string): New function, containing most of
what Fformat_time_string used to contain.
(Fformat_time_string): Rewrite in terms of format_time_string.
This doesn't change this function's behavior.
(current-time-zone): Rewrite to use format_time_string.
This fixes the bug reported by Michael Schierl in
<http://lists.gnu.org/archive/html/emacs-devel/2007-06/msg00334.html>.
Jason Rumney's 2007-06-07 change worked around this bug, but
didn't fix it.
* src/systime.h (tzname, timezone): Remove no-longer-used declarations.
ChangeLog
configure.in
src/ChangeLog
src/editfns.c
src/systime.h